/*
 * Powered By [rapid-framework]
 * Web Site: http://www.rapid-framework.org.cn
 * Google Code: http://code.google.com/p/rapid-framework/
 * Since 2008 - 2013
 */

package com.smg.community.service;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.*;

import javacommon.base.*;
import javacommon.util.*;

import cn.org.rapid_framework.util.*;
import cn.org.rapid_framework.web.util.*;
import cn.org.rapid_framework.page.*;
import cn.org.rapid_framework.page.impl.*;

import com.smg.community.model.*;
import com.smg.community.dao.*;
import com.smg.community.service.*;
import com.smg.community.setting.ProjectSetting;
import com.smg.community.vo.query.*;

/**
 * @author badqiu email:badqiu(a)gmail.com
 * @version 1.0
 * @since 1.0
 */

@Service
@Transactional
public class SmgGroupManager extends BaseManager<SmgGroup,java.lang.Integer>{

	private SmgGroupDao smgGroupDao;
	/**增加setXXXX()方法,spring就可以通过autowire自动设置对象属性,请注意大小写*/
	public void setSmgGroupDao(SmgGroupDao dao) {
		this.smgGroupDao = dao;
	}
	public EntityDao getEntityDao() {
		return this.smgGroupDao;
	}
	
	@Transactional(readOnly=true)
	public Page findPage(SmgGroupQuery query) {
		return smgGroupDao.findPage(query);
	}
	public List<SmgGroup> getByQuery(SmgGroupQuery groupQuery) {
		return smgGroupDao.getByQuery(groupQuery);
	}
	public List<SmgGroup> getSevenHotGroupList(int cityNo) {
			return smgGroupDao.getSevenHotGroupList(cityNo);
	}
	public List<SmgGroup> getByMemberId(int memberId,int size) {
		return smgGroupDao.getByMemberId(memberId,size);
	}
	public Page<SmgGroup> findMemberJoinPage(SmgGroupQuery query) {
		return smgGroupDao.findMemberJoinPage(query);
	}
	public int getMemberMastetGroupCount(Integer memberId) {
		return smgGroupDao.getMemberMastetGroupCount(memberId);
	}
	public int getMemberJoinGroupCount(Integer memberId) {
		// TODO Auto-generated method stub
		return smgGroupDao.getMemberJoinGroupCount(memberId);
	}
	public void addMemberCount(int groupId) {
		smgGroupDao.addMemberCount(groupId);
	}
	public void subMemberCount(int groupId) {
		smgGroupDao.subMemberCount(groupId);
	}
	
}
